<template>
  <div>
    <dv-scroll-board :config="config" style="height: 290px" />
  </div>
</template>
<script>
import { $$Api } from "@/network/request.js";

export default {
  name: "ScrollBoard",
  data() {
    return {
      config: {},
    };
  },
  methods: {
    createChart() {
      $$Api("/data.json")
        .then((result) => {
          this.config = {
            header: ["故障设备", "故障信息", "故障时间"],
            data: result.dataV.scrollBoard,
            index: true,
            align: ["center"],
            rowNum: 5,
            headerBGC: "#1981f6",
          };
          // console.log(this.config.data)
        })
        .catch((err) => {
          console.log(err);
        });
    },
  },
  created() {
    this.createChart();
  },
  mounted() {
    setInterval(this.createChart, 30000);
  },
};
</script>
<style>
.dv-scroll-board .header {
  padding: 0;
  display: flex;
  position: relative;
  flex-shrink: 0;
  margin: 0;
  height: auto;
}
</style>
